**********************************************************************************************************************
********Descriptive Statistics

use analysis.dta, clear

***** Create Figure 2

label var EPA_risk_higher_than ""

twoway (kdensity Q17_ini_rank if treatment == 1, lcolor(gs1) lwidth(*1.5) lpattern(solid)) (kdensity Q17_ini_rank if treatment == 0, lcolor(gs1) lwidth(*1.5) lpattern(dash)) ///
       (kdensity EPA_risk_higher_than if treatment == 1, lcolor(gs12) lwidth(*1.5) lpattern(solid)) (kdensity EPA_risk_higher_than if treatment == 0, lcolor(gs12) lwidth(*1.5) lpattern(dash)), ///
       xtitle("Zip Code Risk Ranking (Percentile)", size(small)) ytitle("Density", size(small)) ///
       ylabel(, labsize(small) nogrid notick) xlabel(,labsize(small) notick) ///
       legend(label(1 "Treatment Group: Perceived Risk") label(2 "Control Group: Perceived Risk") label(3 "Treatment Group: Actual Risk") label(4 "Control Group: Actual Risk") size(small) colfirst) /// 
       graphregion(fcolor(white))
       
 
two-way (kdensity misbelief if treatment == 1, lcolor(gs1) lwidth(*1.5) lpattern(solid)) (kdensity misbelief if treatment == 0, lcolor(gs1) lwidth(*1.5) lpattern(dash)), /// 
       xtitle("Misperception (Perceived Risk - Actual Risk)", size(small)) ytitle("Density", size(small)) ///
       ylabel(, labsize(small) nogrid notick) xlabel(,labsize(small) notick) ///
       legend(label(1 "Treatment Group: Misperception") label(2 "Control Group: Misperception") size(small))  /// 
       graphregion(fcolor(white))